﻿#ifndef SVCAMERA_H
#define SVCAMERA_H

#include <QMap>
#include <QObject>
#include <QVariant>

// The camera’s primary responsibility is to provide clear image acquisition.
// Specific configurations (e.g., resolution, exposure, gain) and property
// management are not part of the core camera abstraction. Instead, the
// abstraction layer may expose generic loading functions to handle such
// requirements when necessary.
// From the software’s perspective, whether the camera delivers a continuous
// stream or a single frame, both are conceptually treated as single image
// acquisition triggers.

class SVCamera : public QObject
{
    Q_OBJECT
public:
    SVCamera(QObject *parent = nullptr);
    virtual ~SVCamera();

    virtual void loadConfigFile(const QString &file) = 0;
    virtual bool applySetting(const QString &key, const QVariant &value) = 0;
    virtual bool open() = 0;
    virtual bool close() = 0;
    virtual QVariant queryCapability(const QString &key) const = 0;
    virtual bool setOption(const QString &key, const QVariant &value) = 0;

signals:
    void frameReady(const QImage &frame);

private:
    QVariantMap mCameraConfig;
};

#endif
